<script>
	import Vue from 'vue'
	export default {
		onLaunch: function() {
			// 获取配置
			console.log('App Launch')

			uni.getSystemInfo({
				success: function(e) {
					// #ifndef MP
					Vue.prototype.StatusBar = e.statusBarHeight;
					if (e.platform == 'android') {
						Vue.prototype.CustomBar = e.statusBarHeight + 50;
					} else {
						Vue.prototype.CustomBar = e.statusBarHeight + 45;
					};
					// #endif

					// #ifdef MP-WEIXIN
					Vue.prototype.StatusBar = e.statusBarHeight;
					let custom = wx.getMenuButtonBoundingClientRect();
					Vue.prototype.Custom = custom;
					Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
					// #endif		

					// #ifdef MP-ALIPAY
					Vue.prototype.StatusBar = e.statusBarHeight;
					Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
					// #endif

					// 手机品牌
					let modelmes = e.model;
					// console.log(modelmes)
					// 如果是 X,XS,XR,XS MAX 均可适配
					if (modelmes.indexOf('iPhone X') != -1) {
						Vue.prototype.IpxBottom = '64rpx'
					} else {
						Vue.prototype.IpxBottom = '0rpx'
					}
				}
			})
		},
		onShow: async function() {
			
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/* #ifndef APP-PLUS-NVUE */
	   @import "/common/styles/main.css";
	   @import "/common/styles/icon.css";
	   @import "/common/styles/qui.scss";
	/* #endif */
	
	/* #ifdef APP-PLUS-NVUE */
	   @import "/common/styles/qui_weex.scss";
	/* #endif */
    
	
</style>
